package com.dog.basics.service.mtkj;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dog.basics.bean.dto.admin.mtkj.CommonDiscountCouponFromDto;
import com.dog.basics.bean.dto.admin.mtkj.DiscountCouponAddDto;
import com.dog.basics.bean.dto.admin.mtkj.DiscountCouponEditDto;
import com.dog.basics.bean.dto.api.mtkj.ApiDiscountCouponAddDto;
import com.dog.basics.bean.dto.api.mtkj.ApiDiscountCouponEditDto;
import com.dog.basics.bean.model.mtkj.MtDiscountCoupon;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dog.basics.bean.vo.admin.mtkj.CommonDiscountCouponListVo;
import com.dog.basics.bean.vo.api.mtkj.ApiDeviceDiscountCouponVo;
import com.dog.basics.bean.vo.api.mtkj.ApiDiscountCouponListVo;
import com.dog.basics.common.util.PageParam;

/**
 * <p>
 * 优惠券表 服务类
 * </p>
 *
 * @author wph
 * @since 2020-11-09
 */
public interface IMtDiscountCouponService extends IService<MtDiscountCoupon> {

    /**
     * admin服务
     *  新增通用优惠券
     * @param: addDto
     * @returns
     * @author hangdy
     * @date: 2020/11/14 9:27
     */
    Boolean saveCommonDiscountCoupon(DiscountCouponAddDto addDto);

    /**
     * admin服务
     *  修改通用优惠券
     * @param: editDto
     * @returns
     * @author hangdy
     * @date: 2020/11/14 9:27
     */
    Boolean editCommonDiscountCoupon(DiscountCouponEditDto editDto);

    /**
     * admin服务
     *  超级管理员删除优惠券
     * @param id
     * @return
     */
    Boolean deleteDiscountCouponByAdmin(Long id);

    /**
     * admin服务
     *  查询优惠券通用优惠券
     * @param: page
     * @param: fromDto
     * @returns
     * @author hangdy
     * @date: 2020/11/14 10:10
     */
    IPage<CommonDiscountCouponListVo> findDiscountCoupon(PageParam page, CommonDiscountCouponFromDto fromDto);

    /**
     * admin服务
     *  查询优惠券通用优惠券APP
     * @param: page
     * @param: fromDto
     * @returns
     * @author hangdy
     * @date: 2020/11/14 10:10
     */
    IPage<ApiDeviceDiscountCouponVo> findAppDiscountCoupon(PageParam page);

    /**
     * 新增优惠券
     * @param: addDto 新增数据dto
     * @returns
     * @author hangdy
     * @date: 2020/11/13 9:28
     */
    Boolean saveDiscountCoupon(ApiDiscountCouponAddDto addDto);

    /**
     * 修改优惠券
     * @param: editDto 数据dto
     * @returns
     * @author hangdy
     * @date: 2020/11/13 9:37
     */
    Boolean editDiscountCoupon(ApiDiscountCouponEditDto editDto);

    /**
     * 删除优惠券
     * @param: id 优惠券id
     * @returns
     * @author hangdy
     * @date: 2020/11/13 9:37
     */
    Boolean deleteDiscountCoupon(Long id);

    /**
     * 查询商铺所有优惠券
     * @param: shopId
     * @returns
     * @author hangdy
     * @date: 2020/11/13 9:41
     */
    IPage<ApiDiscountCouponListVo> findByShopId(PageParam page , Long shopId);

}
